﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WinCSharp
{
    enum ABC { moon, sum, earth }

    public partial class ReflectForm : Form
    {
        


        public ReflectForm()
        {
            InitializeComponent();
        }

        private void btnreflectEnum_Click(object sender, EventArgs e)
        {
            Type tt = Type.GetType("WinCSharp.ABC");


            foreach (System.Reflection.FieldInfo minfo in tt.GetFields())
            {
                listBox1.Items.Add(minfo.Name);
            }
        }

    }
}
